import request from '@/utils/request';


// export async function query(): Promise<any> {
//   const userInfo = await getUserInfo()
//   return Promise.resolve(Object.assign(userInfo.data, JSON.parse(localStorage.getItem('userInfo'))))
// }

export async function queryCurrent(): Promise<any> {
  const userInfo = await getUserInfo()
  return userInfo;
}

export async function queryNotices(): Promise<any> {

  return request('/api/notices');
}

export async function getUserInfo() {
  return request('/upm/auth/api/menus', {
    method: 'GET',
    params: {
      'appkey': 'iqidao-learning-analysis'
    }
  })
}
export async function getTeacherId() {
  return request('/teach-admin/admin/teacher/selfInfo', {
    method: 'POST',
  })
}
